package gcb.metalsys.enums;

import lombok.Getter;
import gcb.metalsys.base.ResultUtil;
import gcb.metalsys.base.dto.ResultDTO;

/**
 * @author ReMidDream
 * @date 2018/10/23 20:55
 **/
@Getter
public enum AccountEnum{

    Error(500,"系统异常"),
    USERNAME_EXIST(501,"帐号名已经存在!"),
    EMAIL_EXIST(502,"邮箱已经存在!"),
    ERRPR_TIME(503,"錯誤時間")
    ;

    private Integer code;

    private String message;

    AccountEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResultDTO show() {
        return ResultUtil.Error(this.code.toString(),this.message);
    }
}
